package com.qiaofang.repository;

import com.qiaofang.entity.PremisesRelationExternal;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.List;

public interface PremisesRelationExternalRepository extends JpaRepository<PremisesRelationExternal, Long>, JpaSpecificationExecutor {
    @Query(value = "from PremisesRelationExternal p where p.isDeleted = '0' and p.premisesId = :premisesId")
    List<PremisesRelationExternal> getPremisesRelationExternal(@Param(value = "premisesId") Long premisesId);
}
